cmake_minimum_required(VERSION 3.10)

project(ShowResult)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_CXX_FLAGS "-g -Wall -Xlinker -export-dynamic")

aux_source_directory(src SRC_SOURCE)
find_package(PkgConfig REQUIRED)
find_package(fmt REQUIRED)
find_package(sdbus-c++ REQUIRED)
find_package(spdlog REQUIRED)
pkg_check_modules(GTKMM REQUIRED IMPORTED_TARGET gtkmm-4.0)
pkg_check_modules(gstreamer REQUIRED IMPORTED_TARGET gstreamer-1.0 gstreamer-video-1.0 gstreamer-app-1.0)
pkg_check_modules(glew REQUIRED IMPORTED_TARGET glew)
pkg_check_modules(glfw REQUIRED IMPORTED_TARGET glfw3)

link_libraries(
  PkgConfig::GTKMM
  PkgConfig::gstreamer
  PkgConfig::glew
  PkgConfig::glfw
  fmt
  rt
  pthread
  SDBusCpp::sdbus-c++
)

add_executable(ShowResult_test
  src/UILoader.cpp
  run/UILoader_test.cpp
  src/MultiLineChart.cpp
  src/BarChart.cpp
)

add_executable(MultiLineChart_test
  src/MultiLineChart.cpp
  run/MultiLineChart_test.cpp
  src/BarChart.cpp
)

add_executable(ShowResult
  run/main.cpp
  ${SRC_SOURCE}
)
